<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>过渡实战3</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        .box{
            width: 200px;
            height: 200px;
            margin: 40px auto;
            perspective: 1000px;
        }
        .box img{
           width: 200px;
           height: 200px; 
           border-radius: 50%;
           border: 1px solid #000;
        }
        .box img.dog{
            position: absolute;
            top: 0;
            left: 0;
            transform-origin: 0 0;
            transition: transform 1s ease 0s;
        }
        .box:hover img.dog{
            transform: rotateY(-180deg);
        }

        .no2 img.dog{
            transform-origin: 100% 100%;
        }
        .no2:hover img.dog{
            transform: rotateY(180deg);
        }
        .no3 img.dog{
            transform-origin: 0 0;
        }
        .no3:hover img.dog{
            transform: rotateX(180deg);
        }
        .no4 img.dog{
            transform-origin: 0 100%;
        }
        .no4:hover img.dog{
            transform:rotateX(180deg);
        }
    </style>
</head>
<body>
    <div class="box">
        <img src="images/cat.jpg" alt="" class="cat">
        <img src="images/dog.jpg" alt="" class="dog">
    </div>
    <div class="box no2">
        <img src="images/cat.jpg" alt="" class="cat">
        <img src="images/dog.jpg" alt="" class="dog">
    </div>
    <div class="box no3">
        <img src="images/cat.jpg" alt="" class="cat">
        <img src="images/dog.jpg" alt="" class="dog">
    </div>
    <div class="box no4">
        <img src="images/cat.jpg" alt="" class="cat">
        <img src="images/dog.jpg" alt="" class="dog">
    </div>
</body>
</html>